/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package views;

import healthcare.coursework.model.MedicalHistory;
import healthcare.coursework.service.MedicalHistoryService;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.util.GenericAutowireComposer;
import org.zkoss.zul.Label;
import org.zkoss.zul.Window;

/**
 *
 * @author Administrator
 */
public class ViewMedicalHistory extends GenericAutowireComposer {

    private Label patientName;
    private Label result;
    private Label medicineRecipe;
    private Label height;
    private Label weight;
    private Label vessel;
    private Window self;
    private MedicalHistory mh;
    private MedicalHistoryService medicalHistoryService = util.Utility.getUtility().getMedicalHistoryService();

    @Override
    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);
        mh = (MedicalHistory) arg.get("medicalHistory");
        patientName.setValue(mh.getPatient().getFullName());
        result.setValue(mh.getDiagnoseResult());
        medicineRecipe.setValue(mh.getMedicineRecipe());
        height.setValue(mh.getHeight()+"");
        weight.setValue(mh.getWeight()+"");
        vessel.setValue(mh.getVessel()+"");
    }

 

    public void onClose(Event e) {
        self.onClose();
    }

  
}
